-
Notifications
You must be signed in to change notification settings - Fork 939
Allow custom names for User-Defined Actions #7958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
c049edd
to
9470fe2
Compare
Nice, so this would close #6991 then? |
4cd8f17
to
a9002db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch looks good, but I do not think it is necessary to add the job id if the user provides a job name.
It forces the user to think about this when reading job information using scripts or automation and also limits the usability for the user if they want to provide other information or information in different format as part of the job name.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7958 +/- ##
==========================================
+ Coverage 80.06% 82.18% +2.11%
==========================================
Files 190 253 +63
Lines 37181 46798 +9617
Branches 9450 11776 +2326
==========================================
+ Hits 29770 38462 +8692
- Misses 2997 3666 +669
- Partials 4414 4670 +256 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a13d930
to
5cfbba4
Compare
64cceae
to
747ab7f
Compare
Shouldn't the datatype in the API be text since name is for sql identifier which this is not. |
Another reason was that Maybe we should have a limit on the length of job name, possibly a bit shorter than 63, to be safe. Any thoughts? |
91d7787
to
6c33371
Compare
fb66024
to
423fad7
Compare
659b009
to
abcd731
Compare
277e4fa
to
f73c309
Compare
This commit allows custom names for Used-Defined Actions. add_job() and alter_job() accept an additional "job_name" argument to modify the name of User-Defined Action. If "job_name" is not specified, it is names as default.
f73c309
to
b000625
Compare
|
||
\c :TEST_DBNAME :ROLE_SUPERUSER | ||
|
||
\set ON_ERROR_STOP 0 | ||
-- test bad input | ||
SELECT alter_job(NULL, if_exists => false); | ||
SELECT alter_job(-1, if_exists => false); | ||
SELECT alter_job(1001, job_name => 'this_is_a_really_really_really_long_application_name_to_overflow'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one test that we can add here is manually changing the job_id (update the job table) let's say to 2147483647 (max for int4) and then try to alter the job and make sure will work if the name fit with big job_id and fail if the name is bigger than the NAMEDATALEN.
This commit allows custom names for Used-Defined Actions.
add_job() and alter_job() accept an additional "job_name" argument to modify the name of User-Defined Action. If "job_name" is not specified, it is names as default.
Closes #6991